package com.atguigu.springcloud.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

/**
 * @USER: dayu Administrator
 * @DATE: 2020/3/25
 * @DESCRIPTION:
 */
@RestController
@Slf4j
public class ConsumerController {

    private static final String INVOKE_URL="http://cloud-provide-payment";

    @Resource
    RestTemplate restTemplate;
    @GetMapping("/consumer/payment/zk")
    public String paymentInfo(){
        return restTemplate.getForObject(INVOKE_URL+"/payment/zk",String.class);
    }
}
